home *** CD-ROM | disk | FTP | other *** search
- In response to...
- >> Ok how will do to make amos to understand that i want to threat this
- >> as a number instead of an ascii value?
- >Isnt this ASC ? or is this some other language thats bouncing round
- >my head!
-
- >a=asc("5") sets a to 5 ????
-
- I wrote...
-
- >This is AMOS but does the opposite of what you are thinking.
- >It would set 'a' to the ASCII value of the string "5".
-
- >What you want to use is VAL I think (although I have forgotten what you
- were
- >originally trying to do now!).
-
- >But, remembering bits, you were PEEKing a value from memory and trying to
- do
- >some maths on the result...
-
- >so a bit of your code is a=PEEK(start(16)) which returns the ASCII value of
-
- >"5", you need to convert the ASCII value to a string using CHR$, then
- >convert the string into a numeric...
-
- >a=(VAL(CHR$(PEEK(Start(16)))
-
- I have just remembered a function which could cut this down a bit...
-
- a=(VAL(PEEK$(Start(16))
-
- should do the same as above.
-
- PEEK$ should return the value of the string at the location specified
- instead of an ASCII value so you don't need to go on to do the CHR$() part.
-
- >Wayne.
-
-
-
-
-